/*! ******************************************************************************
 *
 * Pentaho
 *
 * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com
 *
 * Use of this software is governed by the Business Source License included
 * in the LICENSE.TXT file.
 *
 * Change Date: 2029-07-20
 ******************************************************************************/


package org.pentaho.runtime.test.impl;

import org.pentaho.runtime.test.RuntimeTestStatus;
import org.pentaho.runtime.test.module.RuntimeTestModuleResults;

import java.util.List;

/**
 * Created by bryan on 8/18/15.
 */
public class RuntimeTestStatusImpl implements RuntimeTestStatus {
  private final List<RuntimeTestModuleResults> runtimeTestModuleResults;
  private final int testsDone;
  private final int testsRunning;
  private final int testsOutstanding;
  private final boolean done;

  public RuntimeTestStatusImpl( List<RuntimeTestModuleResults> runtimeTestModuleResults, int testsDone,
                                int testsRunning, int testsOutstanding, boolean done ) {
    this.runtimeTestModuleResults = runtimeTestModuleResults;
    this.testsDone = testsDone;
    this.testsRunning = testsRunning;
    this.testsOutstanding = testsOutstanding;
    this.done = done;
  }

  @Override public List<RuntimeTestModuleResults> getModuleResults() {
    return runtimeTestModuleResults;
  }

  @Override public int getTestsDone() {
    return testsDone;
  }

  @Override public int getTestsRunning() {
    return testsRunning;
  }

  @Override public int getTestsOutstanding() {
    return testsOutstanding;
  }

  @Override public boolean isDone() {
    return done;
  }

  //OperatorWrap isn't helpful for autogenerated methods
  //CHECKSTYLE:OperatorWrap:OFF
  @Override public String toString() {
    return "RuntimeTestStatusImpl{" +
      "runtimeTestModuleResults=" + runtimeTestModuleResults +
      ", testsDone=" + testsDone +
      ", testsRunning=" + testsRunning +
      ", testsOutstanding=" + testsOutstanding +
      ", done=" + done +
      '}';
  }
  //CHECKSTYLE:OperatorWrap:ON
}
